<template>
  <div class="app-container">
    <QueryData v-model="tableData"
               @getList="getList"
               @handleQuery="handleQuery">
      <el-col :span="4">
        <el-form-item label="制度名称" prop="name">
          <el-input v-model="tableData.queryParams.name" placeholder="请输入通知标题" clearable @keyup.enter.native="handleQuery" />
        </el-form-item>
      </el-col>
    </QueryData>
    <TableData v-model="tableData" @getList="getList">
      <el-table-column prop="name" label="制度名称" />
      <el-table-column prop="tbAnnexeList" label="附件列表" />
    </TableData>
  </div>
</template>
<script>
import pageMixin from '@/mixins/pageMixin'
export default {
  mixins: [pageMixin],
  created () {
    this.getList()
  },
  methods: {
    getList () {
      this.$api.trafficSafety.list(this.tableData.queryParams).then(response => {
        this.tableData.data = response.data.records
        this.tableData.total = response.data.total
        this.tableData.loading = false
      })
    }
  }

}
</script>
